<?php
/**
 * Created by PhpStorm.
 * User: kongjg
 * Date: 16/8/15
 * Time: 上午11:31
 */

    try {
        $dbh = new PDO('mysql:host=118.193.238.118;dbname=leiyier1_db','leiyier1_db','zhu0601qing');
        if($dbh){
            echo 'success';
            return $dbh;

        }
    }catch (PDOException $e){
        die ('error:'.$e->getMessage().'<br/>');
    }